#include "../include/stu.h"
void updatedata()
{
	struct student *p = head1;
	while (p != NULL) {
		int sum = 0;
		for(int i=0;i<p->num;i++) {
			sum += findscore(p->class[i]);
		}
		p->credit = sum;
		p = p->next;
	}
}
